package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PUserPermissionMapper;
import syllabus.model.Criteria;
import syllabus.model.PUserPermission;
import syllabus.service.PUserPermissionService;

@Service
public class PUserPermissionServiceImpl implements PUserPermissionService {
    @Autowired
    private PUserPermissionMapper pUserPermissionMapper;

    private static final Logger logger = LoggerFactory.getLogger(PUserPermissionServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pUserPermissionMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PUserPermission selectByPrimaryKey(Integer id) {
        return this.pUserPermissionMapper.selectByPrimaryKey(id);
    }

    public List<PUserPermission> selectByExample(Criteria example) {
        return this.pUserPermissionMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pUserPermissionMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PUserPermission record) {
        return this.pUserPermissionMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PUserPermission record) {
        return this.pUserPermissionMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pUserPermissionMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PUserPermission record, Criteria example) {
        return this.pUserPermissionMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PUserPermission record, Criteria example) {
        return this.pUserPermissionMapper.updateByExample(record, example);
    }

    public int insert(PUserPermission record) {
        return this.pUserPermissionMapper.insert(record);
    }

    public int insertSelective(PUserPermission record) {
        return this.pUserPermissionMapper.insertSelective(record);
    }
}